<?php
namespace app\appin\service;

class Taglib extends BaseService
{
	public static function getFacadeName()
	{
		return 'Taglib';
	}
	
	/**
	 * 加载标签
	 */
	public function loadAppinTaglib( $defaultTag = '' )
	{
		$tags = '';
		$appin = Package::allAppin();
		if ( ($count = count($appin)) > 0 ) {
			for( $i = 0; $i < $count; $i++ ) {
				$appinCnf = Package::load($appin[$i]);
				if ( isset($appinCnf['taglib']) && !empty($appinCnf['taglib'])) {
					$tags .= empty($tags) ? $appinCnf['taglib'] : ','.$appinCnf['taglib'];
				}
			}
		}

		return $tags .=  empty($tags) ? $defaultTag : ',' . $defaultTag;
	}
}